import { createApp } from 'vue'
// 引入element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue' // ElementPlus图标

import App from './App.vue'
// 引入样式
import '@/styles/index.scss'
// svg插件需要配置代码
import 'virtual:svg-icons-register'
// 引入自定义插件对象：注册整个项目全局组件
import gloalComponent from '@/components'
// 引入路由
import router from './router'
// 引入pinia
import pinia from './store'



const app = createApp(App)
// ElementPlus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(gloalComponent)
app.use(router)
app.use(ElementPlus)
app.use(pinia)
app.mount('#app')